package com.boxtelecom.mycircle;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;

public class SplashScreen extends Activity{
		
		private static final int STOPSPLASH  = 0;
		private static final int _splashTime = 5000; // time to display the splash screen in ms
		
		private Handler splashHandler = new Handler(){
			public void handleMessage(Message msg){
				switch(msg.what){
					case STOPSPLASH:
						Intent intent = new Intent(SplashScreen.this, ListingContacts.class);
						startActivity(intent);
						finish();
						break;
						}
				super.handleMessage(msg);
			}
		};
		
	    public void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);
	        setContentView(R.layout.splashscreen);
	        
	        Message msg = new Message();
	        msg.what = STOPSPLASH;
	        splashHandler.sendMessageDelayed(msg, _splashTime);
	    }
}
